package org.nobody.mallb2c.mallmember.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.nobody.common.utils.PageUtils;
import org.nobody.mallb2c.mallmember.entity.MemberEntity;
import org.nobody.mallb2c.mallmember.exception.PhoneExistException;
import org.nobody.mallb2c.mallmember.exception.UsernameExistException;
import org.nobody.mallb2c.mallmember.vo.MemberLoginVo;
import org.nobody.mallb2c.mallmember.vo.MemberRegistVo;
import org.nobody.mallb2c.mallmember.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author fancier
 * @email fancier2093@gmail.com
 * @date 2020-07-30 16:05:29
 */
public interface MemberService extends IService<MemberEntity> {

  PageUtils queryPage(Map<String, Object> params);

  void regist(MemberRegistVo vo);

  void checkPhoneUnique(String phone) throws PhoneExistException;

  void checkUsernameUnique(String username) throws UsernameExistException;

  MemberEntity login(MemberLoginVo vo);

  MemberEntity login(SocialUser vo);
}

